﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Certifys.ascx.cs" Inherits="Job.Web.userControls.Personal.Certifys" %>
<%@ Register Assembly="Job.Web" Namespace="Job.Web.RelatedDrowDownList" TagPrefix="cc1" %>

<script type="text/javascript">
    //    $(document).ready(function() {
    //    $.formValidator.initConfig({ formid: "aspnetForm", onerror: function(msg) { alert('校验没有通过，具体错误请看错误提示') } });
    //    $("#ctl00_maincontent_ctl00_txtCompanyName").formValidator({ onshow: " ", onfocus: " ", oncorrect: " " }).inputValidator({ min: 1, max: 100, onerror: "<img alt='请输入公司名称' src='/Images/no_com.gif' width=15 height=15 />" })
    //    $("#ctl00_maincontent_ctl00_txtPositionName").formValidator({ onshow: " ", onfocus: " ", oncorrect: " " }).inputValidator({ min: 1, max: 100,  onerror: "<img alt='请输入职位名称' src='/Images/no_com.gif' width=15 height=15 />" }); //.defaultPassed();
    //    $("#ctl00_maincontent_ctl00_txtWorkDesc").formValidator({ onshow: " ", onfocus: " ", oncorrect: " " }).inputValidator({ min: 1, max: 500, onerror: "<img alt='请输入工作描述' src='/Images/no_com.gif' width=15 height=15 />" }); //.defaultPassed();

    //    }
    //);

    function checkInput() {
        var selectedvalue = $('#ctl00_maincontent_ctl00_ddlName2').val();
        var othervalue = $('#ctl00_maincontent_ctl00_txtOther').val();
        var hasSelecte = false;
        var hasother = false;
        if (selectedvalue) {
            var realSvalue = $.trim(selectedvalue);
            if (realSvalue != "0") {
                hasSelecte = true;
            }
        }

        if (othervalue) {
            var realovalue = $.trim(othervalue);
            if (realovalue != "") {
                hasother = true;
            }
        }

        if (othervalue == false && hasSelecte == false) {
            alert("请输入证书名称!");
            return false;
        }
        return true;
    }
</script>

<table border="1px" bordercolor="#d8e1e7" style="border-style: solid; border-collapse: collapse"
    width="750" class="ResumeBaseTable" align="left">
    <tr>
        <td colspan="2" class="title_1">
            <asp:Label ID="lblCertify" runat="server" Text="证书"></asp:Label>
        </td>
    </tr>
    <tr align="left">
        <td class="ResumeLabelTD" colspan="2" id="message" runat="server">
            &nbsp
        </td>
    </tr>
    <tr>
        <td colspan="2" height="50px">
            <asp:GridView ID="gvCertify" runat="server" CssClass="table_style1" Width="100%"
                AutoGenerateColumns="False" OnRowCommand="gvCertify_RowCommand" OnRowDeleting="gvCertify_RowDeleting"
                OnRowDataBound="gvCertify_RowDataBound">
                <HeaderStyle CssClass="table_style1_th" />
                <Columns>
                    <asp:TemplateField HeaderText="证书名称">
                        <ItemTemplate>
                            <asp:Label ID="lblCerName" runat="server"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle CssClass="table_style1_td" HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField Visible="False">
                        <ItemTemplate>
                            <asp:Label ID="lblName" runat="server" Text='<%# Bind("CertifyName") %>'></asp:Label>
                            <asp:Label ID="lblOther" runat="server" Text='<%# Bind("Other") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle CssClass="table_style1_td" />
                    </asp:TemplateField>
                    <asp:TemplateField InsertVisible="False" ShowHeader="False" ItemStyle-Width="10%">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtEdit" runat="server" CausesValidation="False" CommandName="Edit"
                                Text="编辑" CommandArgument='<%# Eval("PersonCertifyId") %>'></asp:LinkButton>
                            &nbsp;&nbsp;
                            <asp:LinkButton ID="lbtDelete" runat="server" CausesValidation="False" CommandName="Delete"
                                Text="删除" CommandArgument='<%# Eval("PersonCertifyId") %>' OnClientClick="return confirm('确认要删除这条培训吗?')"></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle CssClass="table_style1_td" Width="100px" />
                    </asp:TemplateField>
                </Columns>
                <SelectedRowStyle BackColor="#EAECEC" />
                <AlternatingRowStyle BackColor="#F6F6F6" />
            </asp:GridView>
        </td>
    </tr>
    <tr>
        <td colspan="2" class="style2">
        </td>
    </tr>
    <tr>
        <td colspan="2" class="title_1">
            <asp:Label ID="lblMode" runat="server" Text=""></asp:Label>( <font color="#ec0000">*</font>
            为必填项)
        </td>
    </tr>
    <tr>
        <td class="ResumeLabelEDUTD">
            获得时间<span><font color="red">*</font> </span>
        </td>
        <td class="ResumeTD">
            <span id="ctl00_maincontent_ctl00_tbEndDateTip">
                <asp:DropDownList ID="ddlYear" runat="server" Width="90px">
                </asp:DropDownList>
            </span>年<span id="ctl00_maincontent_ctl00_tbEndDateTip0"><asp:DropDownList ID="ddlMonth"
                runat="server" Width="50px">
            </asp:DropDownList>
                月</span>
        </td>
    </tr>
    <tr>
        <td class="ResumeLabelEDUTD">
            证书名称<span><font color="red">*</font> </span>
        </td>
        <td class="ResumeTD">
            <asp:DropDownList ID="ddlName1" runat="server" Width="200px">
            </asp:DropDownList>
            <asp:DropDownList ID="ddlName2" runat="server" Width="200px">
            </asp:DropDownList>
            <cc1:RelatedList ID="RelatedListName" runat="server">
            </cc1:RelatedList>
        </td>
    </tr>
    <tr>
        <td class="ResumeLabelEDUTD">
        </td>
        <td class="ResumeTD">
            <asp:TextBox ID="txtOther" runat="server" Width="400px" CssClass="TextBox" MaxLength="50"></asp:TextBox><br />
            (如果您的证书未出现在列表中，请填写在这里)
        </td>
    </tr>
    <tr>
        <td class="ResumeLabelEDUTD">
            成绩
        </td>
        <td class="ResumeTD">
            <asp:TextBox ID="txtResult" runat="server" Width="400px" CssClass="TextBox" MaxLength="100"></asp:TextBox>
            <span id="ctl00_maincontent_ctl00_txtDescTip"></span>
        </td>
    </tr>
    <tr>
        <td colspan="2" align="center">
            <asp:Button ID="btnSave" runat="server" Text="保存证书" CssClass="btn_2k3" OnClick="btnSave_Click" />
        </td>
    </tr>
</table>
